* {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.main-home {
  display: flex;
  justify-content: start;
  align-items: center;
  flex-direction: column;
}

:root {
  /* ==========clors============ */
  --body-color: #e4e9f7;
  --sidebar-color: #fff;
  --primary-color: #695cfe;
  --primary-color-light: #f1f1f1;
  --toggle-color: #ddd;
  --text-color: #707070;

  /* ===========Transition=========== */
  --tran-02: all 0.2s ease;
  --tran-03: all 0.3s ease;
  --tran-04: all 0.4s ease;
  --tran-05: all 0.5s ease;
}

body {
  height: 100vh;
  background: var(--body-color);
  transition: var(--tran-05);
}

body.dark {
  --body-color: #18191a;
  --sidebar-color: #242526;
  --primary-color: #3a3b3c;
  --primary-color-light: #3a3b3c;
  --toggle-color: #fff;
  --text-color: #ccc;
}


/* ======= Sideba r======= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 250px;
  padding: 10px 14px;
  background: var(--sidebar-color);
  transition: var(--tran-05);
  z-index: 100;
}

.sidebar.close {
  width: 88px;
}

/* ======= Resuable CSS ======= */
.sidebar .text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color);
  transition: var(--tran-03);
  white-space: nowrap;
  opacity: 1;
}

.sidebar.close .text {
  opacity: 0;
}

.sidebar .image {
  min-width: 60px;
  display: flex;
  align-items: center;
}


.sidebar li {
  height: 50px;
  margin-top: 10px;
  list-style: none;
  display: flex;
  align-items: center;
}

.sidebar li .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  font-size: 20px;
}

.sidebar li .icon,
.sidebar li .text {
  color: var(--text-color);
  transition: var(--tran-02);
}

.sidebar .image-text img {
  width: 40px;
  border-radius: 6px;
}

.sider header {
  position: relative;
}

.sidebar header .image-text {
  display: flex;
  align-items: center;
}

header .image-text .header-text {
  display: flex;
  flex-direction: column;
}

.header-text .name {
  font-weight: 600;
}

.header-text .profession {
  margin-top: -2px;

}

.sidebar header .toggle {
  position: absolute;
  top: 4%;
  right: -14px;
  transform: translateY(-50%) rotate(180deg);
  height: 25px;
  width: 25px;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--sidebar-color);
  font-size: 18px;
  transition: var(--tran-03);
}

.sidebar.close header .toggle {
  transform: translateY(-50%);
}

body .dark .sidebar header .toggle {
  color: var(--text-color);
}


.sidebar .search-box {
  background: var(--primary-color-light);
  border-radius: 6px;
}

.search-box input {
  height: 100%;
  width: 100%;
  outline: none;
  border: none;
  border-radius: 6px;
  background: var(--primary-color-light);
}


.sidebar li a {
  text-decoration: none;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: var(--primary-color);
}

.sidebar li a:hover {
  background: var(--primary-color);
}

.sidebar li a:hover .icon,
.sidebar li a:hover .text {
  color: var(--sidebar-color);
}

body.dark .sidebar li a:hover .icon,
body.dark .sidebar li a:hover .text {
  color: var(--text-color);
}

.sidebar .menu-bar {
  height: calc(100% - 50px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-bar .mode {
  position: relative;
  border-radius: 6px;
  background: var(--primary-color-light);
}

.menu-bar .mode .moon-sun {
  height: 50px;
  width: 60px;
  display: flex;
  align-items: center;
}

.menu-bar .mode i {
  position: absolute;
  transition: var(--tran-03);
}

.menu-bar .mode i.sun {
  opacity: 0;
}

body.dark .menu-bar .mode i.sun {
  opacity: 1;
}

body.dark .menu-bar .mode i.moon {
  opacity: 0;
}


.menu-bar .mode .toggle-switch {
  position: absolute;
  right: 0;
  height: 100%;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  background: var(--primary-color-light);
}

.toggle-switch .switch {
  position: relative;
  height: 22px;
  width: 44px;
  border-radius: 25px;
  background: var(--toggle-color);
}

.switch::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--sidebar-color);
  transition: var(--tran-03);
}

body.dark .switch::before {
  left: 25px;
}

.main-home {
  position: relative;
  left: 250px;
  height: 100vh;
  width: calc(100% - 250px);
  transition: var(--tran-05);
  background: var(--body-color);
}

.main-home .text {
  font-size: 30px;
  font-weight: 500;
  color: var(--text-color);
  padding: 8px 40px;
}

.sidebar.close ~ .main-home {
  left: 88px;
  width: calc(100 - 88px);
}
.search-box {
  display: flex;
}